package co.fitstart.entity.course;

import co.fitstart.entity.principal.SpecialTags;

public enum CourseUnit {

    // 0元 1.5小时，不计课时，单个手机号所有门店只能体验两次 DONE
    NORMAL_EXPERIENCE("normal_experience", "常规体验", "experience", "green"),

    // 0元 2节课，不计课时，单个手机号所有门店只能体验1次 DONE
    NORMAL_WEEK_EXPERIENCE("normal_week_experience", "1v1体验周卡", "experience", "green"),

    // new 399元 2节课， 计算课时， 单个手机号所有门店只能体验1次，7天两节课 DONE
    NORMAL_EXPERIENCE_WEEK("normal_experience_week", "常规体验周卡", "experience", "green"),

    // new 599元 2节课，计课时，单个手机号所有门店只能体验1次，任意选择，7天两节课
    SPECIAL_EXPERIENCE_WEEK("special_experience_week", "特色体验周卡", "experience", "green"),

    // new 799元 4节课，计课时，单个手机号所有门店只能体验1次，任意选择，14天4节课
    SPECIAL_WEEK_EXPERIENCE("special_week_experience", "迷你小课包", "experience", "green"),

    // new 999元 1小时，计课时，单个手机号所有门店只能体验1次，7天两节课 DONE
    SPECIAL_EXPERIENCE("special_experience", "专项体态矫正管理周卡", "experience", "green"),

    NORMAL_INDIVIDUAL("normal_individual", "1v1常规课", "individual", "yellow"),

    OTHER_INDIVIDUAL("other_individual", "1v1常规课(其他)", "individual", "yellow"),

    // new
    FAST_INDIVIDUAL("fast_individual", "急速燃脂", "individual", "yellow"),

    // new
    SHAPE_INDIVIDUAL("shape_individual", "基础塑形", "individual", "yellow"),

    // new
    NEW_OTHER_INDIVIDUAL("new_other_individual", "1v1常规课(其他)", "individual", "yellow"),

    BOXING_SPECIAL("boxing_special", "拳击课", "special", "yellow"),

    STRETCH_SPECIAL("stretch_special", "拉伸课", "special", "yellow"),

    FUNCTION_SPECIAL("function_special", "功能训练课", "special", "yellow"),

    VESTLINE_SPECIAL("vestline_special", "专项塑形课（马甲线）", "special", "yellow"),

    BEAUTYBACK_SPECIAL("beautyback_special", "专项塑形课（美人背）", "special", "yellow"),

    PEACHBUTT_SPECIAL("peachbutt_special", "专项塑形课（蜜桃臀）", "special", "yellow"),

    CHEST_SPECIAL("chest_special", "专项塑形课（方正胸肌）", "special", "yellow"),

    SHOULDER_SPECIAL("shoulder_special", "专项塑形课（宽肩塑造）", "special", "yellow"),

    ABDOMINAL_SPECIAL("abdominal_special", "专项塑形课（腹肌雕刻）", "special", "yellow"),

    // new
    Y_BOXING_SPECIAL("y_boxing_special", "燃脂拳击", "special", "yellow"),

    // new
    H_STRETCH_SPECIAL("h_boxing_special", "恢复再生", "special", "yellow"),

    // new
    BABY_SPECIAL("baby_special", "孕产恢复", "special", "yellow"),

    // new
    BODY_SPECIAL("body_special", "形体雕刻", "special", "yellow"),

    NORMAL_POSTURE("normal_posture", "1v1专项体态调整管理", "posture", "rosered"),

    // new
    POSTURE_BEAUTY("posture_beauty", "体态矫正及美化", "posture", "rosered"),

    // new
    POSTURE_FIX("posture_fix", "运动康复损伤疼痛处理", "posture", "rosered"),

    YEAR_ROUND("year_round", "年卡", "year", "orange"),

    MONTH_ROUND("month_round", "月卡", "year", "orange"),

    SEASON_ROUND("season_round", "季卡", "year", "orange"),

    YEAR_SPECIAL_ROUND("month_special_round", "特色年卡", "year", "orange"),

    MONTH_SPECIAL_ROUND("month_special_round", "特色月卡", "year", "orange"),

    SEASON_SPECIAL_ROUND("season_special_round", "特色季卡", "year", "orange"),

    Y_HANG_TRAINING("y_hang_training", "悬挂训练", "special", "yellow"),

    LING_HU_SPECIAL("ling_hu_special", "铃壶专项", "special", "yellow"),

    VIPR_SPECIAL("vipr_special", "VIPR专项", "special", "yellow"),

    YOUNG_INDIVIDUAL("young_individual", "青少年专项", "individual", "yellow"),

    SPECIAL_UNION("special_union", "特色75min", "special", "purple"),

    YEAR_CARD("year_card", "会籍年卡", "card", "brown"),

    SEASON_CARD("season_card", "会籍季卡", "card", "brown"),

    MONTH_CARD("month_card", "会籍月卡", "card", "brown"),
    
    SPECIAL_ALL("special_all", "全能课包", "special", "yellow");

    private CourseUnit(String alias, String description, String parent, String color) {
        this.alias = alias;
        this.description = description;
        this.parent = parent;
        this.color = color;
    }

    /**
     * 
     * @param alias
     * @return
     */
    public static CourseUnit aliasOf(String alias) {
        for (CourseUnit courseType : CourseUnit.values()) {
            if (courseType.getAlias().equalsIgnoreCase(alias)) {
                return courseType;
            }
        }

        return null;
    }

    public static SpecialTags changeTag(CourseUnit courseUnit) {
        if (courseUnit == null) {
            return null;
        } else if (courseUnit.equals(CourseUnit.BOXING_SPECIAL)) {
            return SpecialTags.BOXING;
        } else if (courseUnit.equals(CourseUnit.Y_BOXING_SPECIAL)) {
            return SpecialTags.BOXING;
        } else if (courseUnit.equals(CourseUnit.H_STRETCH_SPECIAL)) {
            return SpecialTags.STRETCH;
        } else if (courseUnit.equals(CourseUnit.BABY_SPECIAL)) {
            return SpecialTags.BABY;
        } else if (courseUnit.equals(CourseUnit.BODY_SPECIAL)) {
            return SpecialTags.BODY;
        } else if (courseUnit.equals(CourseUnit.STRETCH_SPECIAL)) {
            return SpecialTags.STRETCH;
        } else if (courseUnit.equals(CourseUnit.FUNCTION_SPECIAL)) {
            return SpecialTags.FUNCTION;
        } else if (courseUnit.equals(CourseUnit.NORMAL_POSTURE)) {
            return SpecialTags.SHAPE;
        } else if (courseUnit.equals(CourseUnit.POSTURE_BEAUTY)) {
            return SpecialTags.SHAPE;
        } else if (courseUnit.equals(CourseUnit.POSTURE_FIX)) {
            return SpecialTags.SHAPE;
        } else if (courseUnit.equals(CourseUnit.Y_HANG_TRAINING)) {
            return SpecialTags.HANG;
        } else if (courseUnit.equals(CourseUnit.VIPR_SPECIAL)) {
            return SpecialTags.VIPR;
        } else {
            return null;
        }
    }

    private String alias;

    private String description;

    private String parent;

    private String color;

    /**
     * @return the alias
     */
    public String getAlias() {
        return alias;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the parent
     */
    public String getParent() {
        return parent;
    }

    /**
     * @return the color
     */
    public String getColor() {
        return color;
    }
}
